#pragma once

#include "fxcc/core/graph/opengl3/pch.h"

namespace fxcc
{
	namespace graph
	{
		namespace opengl3
		{

			struct FXCC_API SamplerDesc
			{

				unsigned int minFilter;
				unsigned int magFilter;
				unsigned int wrapS;
				unsigned int wrapT;
				unsigned int wrapR;
				// float lodBias;
				unsigned int minLod;
				unsigned int maxLod;
				unsigned int baseLevel;
				unsigned int maxLevel;
				unsigned int compareMode;
				unsigned int compareFunc;
				unsigned int swizzleR;
				unsigned int swizzleG;
				unsigned int swizzleB;
				unsigned int swizzleA;

				bool useBorderColor;
				float borderColor[4];

				SamplerDesc();
				void BindTexture(int target) const;
			};

			struct FXCC_API Sampler
			{
				unsigned int ID;

				bool CreateFromDesc(const SamplerDesc& desc);
				void Bind(unsigned int tex);
			};
		};
	}
};